package cn.pjz.basic.result;


import cn.pjz.basic.vo.AggTermsVo;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author ACER
 */
@Data
public class PageList<T> {

    private long total;//查询结果集总条数
    private List<T> rows = new ArrayList<>();//当前页的数据集合

    //聚合
    private Map<String, List<AggTermsVo>> aggrMap = new HashMap<>();

    public PageList() {
    }

    public PageList(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public PageList(long total, List<T> rows, Map<String, List<AggTermsVo>> aggrMap) {
        this.total = total;
        this.rows = rows;
        this.aggrMap = aggrMap;
    }
}